//============================================================================
//	警告: 这个文件是使用2009-8-28 17:56:54建立的IBatisNetGen.DaoImpl.cst生成的.
//				重新生成时,原先手动做的修改将会丢失.
//============================================================================
using System;
using System.Collections.Generic;
using System.Text;
using IBatisNet.DataMapper;
using Bino.ExamOnline.Components.Entitys;
using Bino.ExamOnline.Components.Interface;
using CMail.Common.TextLib;

namespace Bino.ExamOnline.DataProvider 
{	
    /// <summary>实现<see cref="ITeacherDao"/>接口.</summary>
    public class TeacherDataProvider : ITeacherDao 
	{
		/// <summary>实现 <see cref="ITeacherDao.GetTeachersCount"/></summary>
		public int GetTeachersCount() {
			string statementId = "Teacher.GetTeachersCount";
			int result = ExecuteQueryForObject<int>(statementId, null);
			return result;
		}

		/// <summary>实现 <see cref="ITeacherDao.GetTeacher"/></summary>
		public Teacher GetTeacher(Int32 iD) 
		{
			string statementId = "Teacher.GetTeacher";
			Teacher result = ExecuteQueryForObject<Teacher>(statementId, iD);
			return result;
		}


		/// <summary>实现 <see cref="ITeacherDao.GetAllTeachers"/></summary>
		public IList<Teacher> GetAllTeachers() 
		{
			string statementId = "Teacher.GetAllTeachers";
			IList<Teacher> results = ExecuteQueryForList<Teacher>(statementId, null);
			return results;
		}

		/// <summary>实现 <see cref="ITeacherDao.GetAllTeachersWithOutLob"/></summary>
		public IList<Teacher> GetAllTeachersWithOutLob()
		{
			string statementId = "Teacher.GetAllTeachersWithOutLob";
			IList<Teacher> results = ExecuteQueryForList<Teacher>(statementId, null);
			return results;
		}
	
		/// <summary>实现 <see cref="ITeacherDao.CreateTeacher"/></summary>
		public void CreateTeacher(Teacher obj)
		{
			if (obj == null) 
				return;
			string statementId = "Teacher.CreateTeacher";
			ExecuteInsert(statementId, obj);
		}

		/// <summary>实现 <see cref="ITeacherDao.UpdateTeacher"/></summary>
		public void UpdateTeacher(Teacher obj) 
		{
			if (obj == null) 
				return;
			string statementId = "Teacher.UpdateTeacher";
			ExecuteUpdate(statementId, obj);
		}

		/// <summary>实现 <see cref="ITeacherDao.DeleteTeacher"/></summary>
		public void DeleteTeacher(Teacher obj) 
		{
			if (obj == null)
				return;
			string statementId = "Teacher.DeleteTeacher";
			ExecuteDelete(statementId, obj);
		}

		/// <summary>实现 <see cref="ITeacherDao.DeleteTeacherByID"/></summary>
		public int DeleteTeacherByID(Int32 iD) 
		{
			string statementId = "Teacher.DeleteTeacherByID";
			int result = ExecuteDelete(statementId, iD);
			return result;
		}		

		/// <summary>实现 <see cref="ITeacherDao.ReloadTeacher"/></summary>
		public void ReloadTeacher(Teacher obj) 
		{
			if (obj == null) 
				return;
			string statementId = "Teacher.GetTeacher";
			ExecuteQueryForObject<Teacher>(statementId, obj, obj);
		}		

	}
}
